import request from '@/utils/request';

export async function getPickingOverViewByPage(params: any) {
  return request('/api/product/getPickingOverViewByPage', {
    method: 'POST',
    data: params,
  });
}

export async function getPickingReccieveDetailsByPage(params: any) {
  return request('/api/product/getPickingReccieveDetailsByPage', {
    method: 'POST',
    data: params,
  });
}

export async function exportPickingOverView(params: any) {
  return request('/api/product/exportPickingOverView', {
    method: 'POST',
    data: params,
    responseType: 'blob',
  });
}

// 未接受数据
export async function getPickingTaskByNotReceived(params: any) {
  return request('/api/product/getPickingTaskByNotReceived', {
    method: 'POST',
    data: params,
  });
}

// 已接受数据
export async function getPickingTaskByReceived(params: any) {
  return request('/api/product/getPickingTaskByReceived', {
    method: 'POST',
    data: params,
  });
}

// 已完成数据
export async function getPickingReceptionByPage(params: any) {
  return request('/api/product/getPickingReceptionByPage', {
    method: 'POST',
    data: params,
  });
}

// 车间接受
export async function workshopReception(para: any) {
  return request('/api/product/workshopReception', {
    method: 'POST',
    data: para,
    params: {
      id: para.id,
    },
  });
}
export async function workshopReception2(para: any) {
  return request('/api/product/workshopReception2', {
    method: 'POST',
    params: {
      wo: para,
    },
  });
}

export default {
  getPickingOverViewByPage,
  exportPickingOverView,
  getPickingTaskByNotReceived,
  getPickingTaskByReceived,
  workshopReception2,
};
